package org.giovanolli.mumi.view.converter;

import javax.faces.convert.FacesConverter;

import org.giovanolli.mumi.entities.PaymentType;

@FacesConverter(value = "paymentTypeConverter")
public class PaymentTypeConverter extends SelectItemsBaseConverter<PaymentType> {
	@Override
	public String getAsString(Object value) {
		return ((PaymentType) value).name().toString();
	}

	@Override
	public String getItemLabel(PaymentType object) {
		return object != null ? object.name() : null;
	}

	@Override
	public Object getItemValue(PaymentType object) {
		return object;
	}

}